<div class="row">
<?=$system_message;?>
	<div>
		<label class="label">Subjects Set:</label>
		<hr class="clearfix">
		<?if(!empty($schedules)):?>
		<table class="data-table">
			<thead class="tabular-head">
			<tr class="profile_box">
				<th>Subject</th>
				<th>Teacher</th>
				<th>Time</th>
				<th>Day</th>
			</tr>
			</thead>
			<tbody class="tabular">

				<tr>
					<td><?=$schedules->subj_desc;?></td>
					<td><?=$schedules->teacher;?></td>
					<td><?=$schedules->time_from;?> - <?=$schedules->time_to;?></td>
					<td><?=$schedules->day;?></td>
				</tr>
			</tbody>
		</table>
		<?else:?>
			<div class="notice">No Subject was assigned for this section</div>
		<?endif;?>
	</div>
	
	<?	echo validation_errors() == '' ? NULL : '<div class="error">'.validation_errors().'</div>';
		$subjects_select = array(''=>'Select Subjects...');
		if(!empty($schedules)):
		
			foreach($subjects as $subject)
			{
				$subjects_select[$subject->subj_id] = '['.$subject->subj_code.'] '.$subject->subj_desc ;
			}
			
		$value_t_s = set_value('t_s',$schedules->time_from);
		$value_t_e = set_value('t_e',$schedules->time_to);
		$value_days = set_value('days',$schedules->day);
	?>

		<div>
			<label class="label">Update Subject Teacher/Schedule</label>
			<hr class="clearfix">
			<form action="<?=site_url('rss-update-schedule/'.$schedules->schedule_id.'/'.$section_id);?>" method="POST">
				<div class="row">
					<div class="small-6 columns">
						  <label>Time From</label>
						  <input type="text" name="t_s" maxlength="5" value="<?=$value_t_s;?>">
					 </div>
					 
					 <div class="small-6 columns">
						  <label>Time To</label>
						  <input type="text" name="t_e"  maxlength="5" value="<?=$value_t_e;?>">
					 </div>
				</div>
				<div class="row">
					<div class="large-6 columns">
						<label>Select Subject:</label>
						<input type="text" value="<?=$schedules->subj_desc;?>" disabled>
					</div>

					<div class="large-6 columns">
						<label>Days:</label>
						<input type="text" name="days" value="<?=$value_days;?>">
					</div>
				</div>
				
				<div class="row">
					<div class="large-6 columns">
						<label>Teacher In Charge</label>
						<?=form_dropdown('teacher', $teachers,set_value('teacher',$schedules->teacher_id));?>
					</div>

					<div class="large-6 columns"></div>
				</div>
				<div class="input-block" style="clear:both;">
					<input type="hidden" name="schedule_id" value="<?=$schedules->schedule_id;?>">
					<input type="hidden" name="subject_id" value="<?=$schedules->subject_id;?>">
					<?php echo form_submit('update_schedule', 'Update Schedule','class="btn btn-small btn-primary"'); ?>
				</div>
			</form>
		</div>
	<?else:?>
		<div class="notice">
			No subjects Available, Please Contact Admin
		</div>
	<? endif;?>
	</div>
	<div class="row">
	<a href="<?=site_url('rss-section-detail/'.$section_id);?>" class="btn btn-mini btn-success">Back To Section.</a>
	</div>